﻿namespace HEFramework
{
    public static class DataTableComponentSystem
    {
        [EntitySystem]
        public class DataTableComponentAwakeSystem : AwakeSystem<DataTableComponent>
        {
            protected override void Awake(DataTableComponent _self)
            {
            }
        }

        public static bool LoadLocalizationDic(this DataTableComponent _self, string _langName)
        {
            return DataTableLoader.Instance.LoadLocalizationDic(_langName);
        }

        public static DataTable<T> LoadDataTable<T>(this DataTableComponent _self) where T : IData
        {
            return DataTableLoader.Instance.LoadDataTable<T>();
        }

        public static DataTable<T> GetDataTable<T>(this DataTableComponent _self) where T : IData
        {
            return DataTableLoader.Instance.GetDataTable<T>();
        }
    }
}